<?php
/*
YHM (Your Hosting Manager) - Copyright 2010 All Rights Reserved. - YHM Group
Released under the Simplified BSD Licence.

Website: http://yhm.co.uk
Licence: http://yhm.co.uk/about/#licence

file: header.php
author: Kieran D. (Polarbear541)
*/
require_once("./global.php");
?>

<div id="header">

<?php if (!empty($username)) { ?>

<center><p>Welcome back, <b><?php echo $username; ?></b> <br /> <a href='./member.php?action=editprofile'>Edit Profile</a> &bull; <a href='./member.php?action=logout'>Logout</a></p></center>

<?php } ?>

<a href="./index.php"><img src="./images/logo.png"></img></a>	

<?php
if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] !== true)
{ ?>

<div class="menu"><ul>
<li><a <?php if ($page == "login") { echo 'class="active"'; } ?>  href="./member.php?action=login">Login</a></li>
<li><a <?php if ($page == "register") { echo 'class="active"'; } ?>  href="./member.php?action=register">Register</a></li>
<li><a <?php if ($page == "order") { echo 'class="active"'; } ?>  href="./order/index.php">Order</a></li>
</ul></div></div>

<?php
}
elseif ($_SESSION['gid'] == 1)
{ ?>

<div class="menu"><ul>
<li><a <?php if ($page == "home") { echo 'class="active"'; } ?> href="./admin/index.php">Home</a></li>
<li><a <?php if ($page == "status") { echo 'class="active"'; } ?> href="./admin/status.php">Server Status</a></li>
<li><a <?php if ($page == "config") { echo 'class="active"'; } ?> href="./admin/config.php">Configuration</a></li>
<li><a <?php if ($page == "settings") { echo 'class="active"'; } ?> href="#">System Settings<span style='background:url(./images/down_arrow.png) no-repeat right center; padding-left:20px;'>&nbsp;</span></a>
<table><tr><td><ul>
<li><a href="./admin/clients.php">Clients</a></li>
<li><a href="./admin/servers.php">Servers</a></li>
<li><a href="./admin/packages.php">Packages</a></li>
<li><a href="./admin/staffaccounts.php">Staff Accounts</a></li>
<li><a href="./admin/announcements.php">Announcements</a></li>
</ul></td></tr></table>
</li>
<li><a <?php if ($page == "kb") { echo 'class="active"'; } ?> href="./admin/kb.php">Knowledgebase</a></li>
<li><a <?php if ($page == "tickets") { echo 'class="active"'; } ?> href="./admin/tickets.php">Support Tickets</a></li>
<li><a <?php if ($page == "cinfo") { echo 'class="active"'; } ?> href="./admin/cinfo.php">Contact Info</a></li>
</ul>
</div>
</div>

<?php
}
else
{ ?>

<div class="menu">
<ul>
<li><a <?php if ($page == "home") { echo 'class="active"'; } ?> href="./client/index.php">Home</a></li>
<li><a <?php if ($page == "packages") { echo 'class="active"'; } ?> href="./client/packages.php">Packages</a></li>
<li><a <?php if ($page == "status") { echo 'class="active"'; } ?> href="./client/status.php">Server Status</a></li>
<li><a <?php if ($page == "announcements") { echo 'class="active"'; } ?> href="./client/announcements.php">Announcements</a></li>
<li><a <?php if ($page == "support") { echo 'class="active"'; } ?> href="#">Support<span style='background:url(./images/down_arrow.png) no-repeat right center; padding-left:20px;'>&nbsp;</span></a>
<table><tr><td><ul>
<li><a href="./client/cinfo.php">Contact Information</a></li>
<li><a href="./client/kb.php">Knowledgebase</a></li>
<li><a href="./client/tickets.php">Tickets</a></li>
</ul></td></tr></table>
</li>
</ul>
</div>
</div>

<?php } ?>